package com.xopencode.account.controller;

import com.xopencode.account.service.AccountService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author Mcb
 * @date 2022/4/23
 * @apiNote
 */
@RestController
@RequestMapping(value = "/account")
public class AccountController {

    @Autowired
    private AccountService accountService;

    /**
     * 下单
     *
     * @param id
     * @param number
     * @return
     */
    @RequestMapping(value = "/pay")
    public String changeAccount(int id, int number) {
        accountService.changeAccount(id, number);
        return "下单成功";
    }
}
